Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
opt._confirmExternalStorage = cfgFile.confirmExternalStorage();
opt._moveFilesToTrash = cfgFile.moveToTrash();
opt._vfs = _vfs;
- opt._parallelNetworkJobs = account->isHttp2Supported() ? 20 : 6;
+
+ const auto capsMaxConcurrentChunkUploads = account->capabilities().maxConcurrentChunkUploads();
+ opt._parallelNetworkJobs = capsMaxConcurrentChunkUploads > 0
+ ? capsMaxConcurrentChunkUploads
+ : account->isHttp2Supported() ? 20 : 6;
// Chunk V2: Size of chunks must be between 5MB and 5GB, except for the last chunk which can be smaller
const auto cfgMinChunkSize = cfgFile.minChunkSize();